import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/test',
      name: 'Test',
      component: ()=>import('@/views/apply/ApplyTest.vue')
    },
    {
      path: '/review',
      name: '/Review',
      component: ()=>import('@/views/review/ReviewList.vue'),
    },
    {
      path: '/review/record',
      name: '/ReviewRecord',
      component: ()=>import('@/views/review/ReviewRecord.vue'),
    },
    {
      path: '/review/data',
      name: '/ReviewData',
      component: ()=>import('@/views/review/ReviewData.vue'),
    },
    {
      path: '/Hr/',
      name: '/Hr',
      component: ()=>import('@/views/Hr/HrList.vue'),
    },
    {
      path: '/Hr/record',
      name: '/HrRecord',
      component: ()=>import('@/views/Hr/HrRecord.vue'),
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/login/LoginPage.vue'),
    },
    {
      path: '/apply',
      name: 'Apply',
      component: () => import('@/views/apply/ApplyLayout.vue'),
      redirect: '/apply/',
      children: [
        {
            path: '/apply/',
            name: 'ApplySubmit',
            component: () => import('@/views/apply/ApplySubmit.vue')
        },
        {
            path: '/apply/manage',
            name: 'ApplyManage',
            component: () => import('@/views/apply/ApplyManageLayout.vue'),
            redirect: '/apply/manage/show',
            children: [
              {
                  path: '/apply/manage/show',
                  name: 'ApplyShow',
                  component: () => import('@/views/apply/ApplyManage.vue'),
              },
              {
                  path: '/apply/manage/status',
                  name: 'ApplyStatus',
                  component: () => import('@/views/apply/ApplyStatus.vue')
              },
              {
                  path: '/apply/manage/detail',
                  name: 'ApplyDetail',
                  component: () => import('@/views/apply/ApplyDetail.vue')
              }
            ]
        },

        {
            path: '/apply/reimburse',
            name: 'ApplyReimburse',
            component: () => import('@/views/apply/ReimburseManageLayout.vue'),
            redirect: '/apply/reimburse/manage',
            children: [
              {
                  path: '/apply/reimburse/manage',
                  name: 'ReimburseManage',
                  component: () => import('@/views/apply/ReimburseManage.vue')
              },{
                  path: '/apply/reimburse/submit',
                  name: 'ReimburseSubmit',
                  component: () => import('@/views/apply/ReimburseSubmit.vue')
              }
            ]
        }
      ]
    },
    {

    }
  ],
})

export default router
